import { createSlice } from '@reduxjs/toolkit'
const hzyCart = createSlice({
    name: 'hzy',
    initialState: {
        num: 0
    },
    reducers: {
        addnum: (state, actions) => {
            state.num = state.num + actions.payload.num
        }
    }
})
export const { addnum } = hzyCart.actions
export default hzyCart.reducer